home *** CD-ROM | disk | FTP | other *** search
/ Aminet 7 / Aminet 7 - August 1995.iso / Aminet / docs / misc / ConcNews.lha / news / general.programming / comp.lang.c_16676_000030.msg < prev    next >
Encoding:
Text File  |  1994-11-27  |  1.3 KB  |  35 lines

  1. Newsgroups: comp.lang.c
  2. Path: dd.chalmers.se!news.chalmers.se!sunic!pipex!howland.reston.ans.net!math.ohio-state.edu!jussieu.fr!univ-lyon1.fr!swidir.switch.ch!CERN.ch!dxcern!danpop
  3. From: danpop@cernapo.cern.ch (Dan Pop)
  4. Subject: Re: Where to put the {}'s?
  5. Message-ID: <1994May16.221927.2274@dxcern.cern.ch>
  6. Sender: danpop@dxcern.cern.ch (Dan Pop)
  7. Organization: CERN European Lab for Particle Physics
  8. References: <2r0tet$ak8@acme.gatech.edu> <9umFmc1w165w@qnx.nacjack.gen.nz>
  9. Date: Mon, 16 May 1994 22:19:27 GMT
  10. Lines: 23
  11.  
  12. In <9umFmc1w165w@qnx.nacjack.gen.nz> bruce@qnx.nacjack.gen.nz (Bruce Simpson) writes:
  13.  
  14. >I don't know of any C compiler worth a pinch of salt that doesn't
  15. >accept the // form of commenting.  You don't even have to enable
  16. >C++ compatibility options to use it (hey... even MSC6 lets you use
  17. >the double slash!)
  18.  
  19. The // form of commenting does not exist in the C language, it's only a
  20. syntax error and any compiler that accepts it is simply broken and it's
  21. not worth a pinch of salt :-)
  22.  
  23. Consider the following _valid_ C construct:
  24.  
  25. i = a //* comment */ 2;
  26.  
  27. If a C compiler fails to compile it properly, that compiler _is_ broken.
  28.  
  29. Dan
  30. -- 
  31. Dan Pop 
  32. CERN, CN Division
  33. Email: danpop@cernapo.cern.ch
  34. Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
  35.